1. Technical Field
This invention generally relates to computer systems, and more specifically relates to apparatus and methods for performing operations on a database.
2. Background Art
Since the dawn of the computer age, computers have evolved and become more and more powerful. In our present day, computers have become indispensable in many fields of human endeavor including engineering design, machine and process control, information storage and retrieval, and office computing. One of the primary uses of computers is for information storage and retrieval.
Database systems have been developed that allow a computer to store a large amount of information in a way that allows a user to search for and retrieve specific information in the database. For example, an insurance company may have a database that includes all of its policy holders and their current account information, including payment history, premium amount, policy number, policy type, exclusions to coverage, etc. A database system allows the insurance company to retrieve the account information for a single policy holder among the thousands and perhaps millions of policy holders in its database.
Retrieval of information from a database is typically done using database operations such as queries. Other database operations, such as an insert or an update, may manipulate information stored in the database. A database query usually specifies conditions that apply to data stored in the database, and may specify relatively complex logical operations. The database is searched for data that satisfy the conditions in the query, and the matching data is returned as the query result in what is typically referred to as a “result set”.
Structured Query Language (SQL) is one very popular language for querying a relational database. SQL is extremely powerful, yet effectively using SQL requires extensive knowledge of SQL syntax and intimate knowledge and understanding of the structure (or schema) of the underlying database. Many database users have no desire to become SQL experts, they simply want to be able to perform database operations to retrieve needed data from the database. The related application, Ser. No. 10/083,075 filed on Feb. 26, 2002, discloses a mechanism for abstracting queries so that users do not need to know the database schema or details of SQL to perform database operations. An abstract query is translated into SQL or other query languages when the query is executed. Current implementations of SQL require that a table or other data storage entity be specified as a source of data in an SQL query. Once a query is defined, it may be stored for later use. However, if no predefined query matches the query that needs to be performed, a new query must be generated. There is currently no way to use a predefined query as a data source for a different query. As a result, the reusability of a predefined query is limited. Without an apparatus and method for using predefined queries as data sources for a different query, the computer industry will continue to suffer from inefficient mechanisms and methods for performing database operations.